home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / var / lib / dpkg / info / libuuid1.postinst < prev    next >
Text File  |  2009-10-22  |  1KB  |  46 lines

  1. #!/bin/sh
  2.  
  3. set -e
  4.  
  5. ADDUSERCONF='/etc/adduser.conf'
  6.  
  7. if test -f $ADDUSERCONF; then
  8.     FIRST_SYSTEM_UID=$(sed -n "s/^[[:space:]]*FIRST_SYSTEM_UID[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p" $ADDUSERCONF)
  9.     LAST_SYSTEM_UID=$(sed -n "s/^[[:space:]]*LAST_SYSTEM_UID[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p" $ADDUSERCONF)
  10.     FIRST_SYSTEM_GID=$(sed -n "s/^[[:space:]]*FIRST_SYSTEM_GID[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p" $ADDUSERCONF)
  11.     LAST_SYSTEM_GID=$(sed -n "s/^[[:space:]]*LAST_SYSTEM_GID[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p" $ADDUSERCONF)
  12. fi
  13.  
  14. if test -z "$FIRST_SYSTEM_UID"; then
  15.     FIRST_SYSTEM_UID=100
  16. fi
  17. if test -z "$LAST_SYSTEM_UID"; then
  18.     LAST_SYSTEM_UID=999
  19. fi
  20. if test -z "$FIRST_SYSTEM_GID"; then
  21.     FIRST_SYSTEM_GID=100
  22. fi
  23. if test -z "$LAST_SYSTEM_GID"; then
  24.     LAST_SYSTEM_GID=999
  25. fi
  26.  
  27. if ! getent group | grep -q libuuid; then
  28.   groupadd -f -K GID_MIN=$FIRST_SYSTEM_GID -K GID_MAX=$LAST_SYSTEM_GID libuuid
  29. fi
  30. if ! getent passwd | grep -q libuuid; then
  31.    useradd -d /var/lib/libuuid -K UID_MIN=$FIRST_SYSTEM_UID -K UID_MAX=$LAST_SYSTEM_UID -g libuuid libuuid
  32. fi
  33.  
  34. mkdir -p /var/lib/libuuid
  35. chown libuuid:libuuid /var/lib/libuuid
  36. chmod 2775 /var/lib/libuuid
  37.  
  38. # Automatically added by dh_makeshlibs
  39. if [ "$1" = "configure" ]; then
  40.     ldconfig
  41. fi
  42. # End automatically added section
  43.  
  44.  
  45. exit 0
  46.